package com.ninthgroup.mapper;

import com.ninthgroup.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Integer uId);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer uId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    /**
     * 根据条件检索用户信息
     * @param username
     * @param realname
     * @return
     */
    List<User> selectAll(@Param("username") String username, @Param("realname") String realname);


    User findByUsernameAndPassword(@Param("username")String username, @Param("password")String password);



    User slectByUserName(String username);
}